import request from '@/utils/request'

// 查询知识点目录管理列表
export function listList(query) {
  return request({
    url: 'http://localhost:8080/knowledgeList/list',
    method: 'get',
    params: query
  })
}

// 查询知识点目录管理详细
export function getList(id) {
  return request({
    url: 'http://localhost:8080/knowledgeList/' + id,
    method: 'get'
  })
}

// 新增知识点目录管理
export function addList(data) {
  return request({
    url: 'http://localhost:8080/knowledgeList',
    method: 'post',
    data: data
  })
}

//验证知识点目录是否重复
export function duplicateValidation(data){
  return request({
    url: 'http://localhost:8080/knowledgeList/duplicateValidation',
    method: 'post',
    data: data
  })
}

// 修改知识点目录管理
export function updateList(data) {
  return request({
    url: 'http://localhost:8080/knowledgeList',
    method: 'put',
    data: data
  })
}

//修改知识点目录审核
export function updateAuditList(data) {
  return request({
    url: 'http://localhost:8080/knowledgeList/updateKnowledgeAudit',
    method: 'post',
    data: data
  })
}

// 删除知识点目录管理
export function delList(id) {
  return request({
    url: 'http://localhost:8080/knowledgeList/' + id,
    method: 'delete'
  })
}

// 逻辑删除知识点目录管理
export function delListLogic(id) {
  return request({
    url: 'http://localhost:8080/knowledgeList/delListLogic/' + id,
    method: 'delete'
  })
}

// 导出知识点目录管理
export function exportList(query) {
  return request({
    url: 'http://localhost:8080/knowledgeList/export',
    method: 'get',
    params: query
  })
}

// 导出知识点目录审核列表
export function exportListAudit(query) {
  return request({
    url: 'http://localhost:8080/knowledgeList/exportAudit',
    method: 'get',
    params: query
  })
}
